import request from "@/utils/request";

const cameraApi = {
    // 测试连接
    testLink(ip,username){
        return request({
            method:"get",
            url:"/camera/testLink?ip="+ip+"&username="+username,
        });
    },
    // 开、关摄像头
    setCamera(newVal,ip){
        return request({
            method:"get",
            url:"/camera/setCamera?newVal="+newVal+"&ip="+ip,
        });
    },
    // 拍照间隔
    setInterval(newVal,ip){
        return request({
            method:"get",
            url:"/camera/changeTimerInterval?newVal="+newVal+"&ip="+ip,
        });
    },
    // led灯亮度
    setLED(newVal,ip){
        return request({
            method:"get",
            url:"/camera/setLED?newVal="+newVal+"&ip="+ip,
        });
    }

};

export default cameraApi;